#ifndef SET_H
#define SET_H

#include <iostream>
#include <list>
#include <cstdlib>
#include <map>
using std::list;
using std::cout;
using std::endl;
using std::map;

class Set{
	public:
		Set();
		~Set();
		
		void insert( int );
		void print();
		int cardinality();
		void clear();
		bool equals(Set*);
		bool has(int);
		
		void intersection(Set*);
		void union_(Set*);
		static Set* intersection(Set*, Set*);
		static Set* union_(Set*, Set*);
		static bool equals(Set*,Set*);
		int* getArray();
		
	private:
		map<int,bool> elements;
	
};

int compareSets( const void* a, const void* b ){
	return ((Set*)a)->cardinality() < ((Set*)b)->cardinality();
}

#include "set.cpp"



#endif